﻿//yuselenin Anquise Jihuaña
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Upeu.Matricula.Data.Entities;

namespace Upeu.Matricula.Data.Mappings
{
    public class CursoMap : EntityTypeConfiguration<Curso>
    {
        public CursoMap()
        {
            ToTable("cursos");

            HasKey(t => t.CursoId);

            Property(t => t.CursoId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            Property(t => t.Nombrec).IsOptional();
            Property(t => t.Profesor).IsOptional();
            Property(t => t.Horasc).IsRequired();
            Property(t => t.Creditos).IsOptional();
            Property(t => t.Costo_curso).IsRequired();
            Property(t => t.Duracion_curso).IsOptional();
            Property(t => t.Observaciones).IsOptional();

        }
    }
}
